home *** CD-ROM | disk | FTP | other *** search
/ IRIX 6.5 Complementary Applications 2004 February / SGI IRIX 6.5 Complementary Applications 2004 February.iso / dist / OpenOffice.idb / usr / OpenOffice / help / en / sbasic.jar / text / sbasic / common / 03010304.xml < prev    next >
Encoding:
Extensible Markup Language  |  2002-01-24  |  2.9 KB  |  50 lines

  1. <?xml version="1.0" encoding="utf-8"?>
  2. <html><head><title>QBColor Function [Runtime]</title><meta name="filename" content="text/sbasic/common/03010304"/><meta name="language" content="en-US"/><help:css-file-link xmlns:help="http://openoffice.org/2000/help"/><!--The CSS style header method for setting styles--><style type="text/css">
  3.  
  4.         p.P1{
  5.                 }
  6.         p.P2{
  7.                 }
  8.         span.T1{
  9.                 font-weight:bold;}
  10.         </style></head><body>
  11.   
  12.   
  13.   <help:to-be-embedded Eid="qbcolor" xmlns:help="http://openoffice.org/2000/help">
  14.   <p class="Head1"><help:link Id="66394">QBColor Function [Runtime]</help:link></p>
  15.   <p class="Paragraph">Returns the <help:link Id="66436" Eid="rgb">RGB</help:link> color code of the color passed as a color value via an older MS-DOS based programming system.</p>
  16.   </help:to-be-embedded>
  17.   <p class="Paragraph"><span class="T1">Syntax</span>:</p>
  18.   <p class="Paragraph">QBColor (ColorNumber As Integer) <help:key-word value="QBColor" tag="kw66394_1" xmlns:help="http://openoffice.org/2000/help"/></p>
  19.   <p class="Paragraph"><span class="T1">Return value</span>:</p>
  20.   <p class="Paragraph">Long</p>
  21.   <p class="Paragraph"><span class="T1">Parameter</span>:</p>
  22.   <p class="Paragraph">ColorNumber: Any integer expression that specifies the color value of the color passed from an older MS-DOS based programming system.</p>
  23.   <p class="Paragraph"><span class="T1">ColorNumber</span> can be assigned the following values:</p>
  24.   <p class="Paragraph">0 : Black</p>
  25.   <p class="Paragraph">1 : Blue</p>
  26.   <p class="Paragraph">2 : Green</p>
  27.   <p class="Paragraph">3 : Cyan</p>
  28.   <p class="Paragraph">4 : Red</p>
  29.   <p class="Paragraph">5 : Magenta</p>
  30.   <p class="Paragraph">6 : Yellow</p>
  31.   <p class="Paragraph">7 : White</p>
  32.   <p class="Paragraph">8 : Gray</p>
  33.   <p class="Paragraph">9 : Light Blue</p>
  34.   <p class="Paragraph">10 : Light Green</p>
  35.   <p class="Paragraph">11 : Light Cyan</p>
  36.   <p class="Paragraph">12 : Light Red</p>
  37.   <p class="Paragraph">13 : Light Magenta</p>
  38.   <p class="Paragraph">14 : Light Yellow</p>
  39.   <p class="Paragraph">15 : Bright White</p>
  40.   <p class="Paragraph">This function is used only to convert from older MS-DOS based BASIC applications that use the above color codes. The function returns a long integer value indicating the color to be used in the <help:productname xmlns:help="http://openoffice.org/2000/help">%PRODUCTNAME</help:productname> IDE.</p>
  41.   <p class="P2">Example:</p>
  42.   <p class="PropText">Sub ExampleQBColor</p>
  43.   <p class="PropText">Dim iColor As Integer</p>
  44.   <p class="PropText">Dim sText As String</p>
  45.   <p class="PropText">iColor = 7</p>
  46.   <p class="PropText">sText = "RGB= " & Red(QBColor( iColor) ) & ":" & Blue(QBColor( iColor) ) & ":" & Green(QBColor( iColor) )</p>
  47.   <p class="PropText">MsgBox stext,0,"Color " & iColor</p>
  48.   <p class="PropText">End Sub</p>
  49.   <p class="PropText"/>
  50.  </body></html>